use crate::db::{db_select::db_select, db_insert::db_insert};

pub async fn get_x_reverse() ->bool {
    if let Ok(result) = db_select("x_reverse").await {
        return result.value.parse::<bool>().unwrap();
    } else {
        // 默认false
        return false;
    }
}
pub async fn get_y_reverse() ->bool {
    if let Ok(result) = db_select("y_reverse").await {
        return result.value.parse::<bool>().unwrap();
    } else {
        // 默认false
        return false;
    }
}
pub async fn set_x_reverse(status: bool) {
    db_insert("x_reverse", status.to_string().as_str()).await.unwrap();
}
pub async fn set_y_reverse(status: bool) {
    db_insert("y_reverse", status.to_string().as_str()).await.unwrap();
}